import { caseSummary } from '@/services/home';
import { useModel } from '@umijs/max';
import { theme } from 'antd';
import { useEffect, useState } from 'react';
import hBg from './../../assets/homeBg.png';
const Home = () => {
  const { useToken } = theme;
  const { token } = useToken();
  const { initialState } = useModel('@@initialState');
  const [caseSummaryObj, setcaseSummaryObj]: any = useState({
    notAuditSize: 0,
    sumCaseSize: 0,
    yesAuditSize: 0,
  });
  useEffect(() => {
    // caseSummaryFn();
  }, []);
  async function caseSummaryFn() {
    let res = await caseSummary({});

    setcaseSummaryObj(
      res?.data || {
        notAuditSize: 0,
        sumCaseSize: 0,
        yesAuditSize: 0,
      },
    );
  }
  return (
    <div
      style={{
        display: 'flex',
        justifyContent: 'flex-start',
        minHeight: '88vh',
      }}
    >
      <div
        style={{
          width: '100%',
          backgroundImage: 'url(' + hBg + ')',
        }}
      >
        <div
          style={{
            fontSize: '20px',
            color: token.colorTextHeading,
            marginBottom: '0px',
            lineHeight: '66px',
            textAlign: 'left',
            paddingLeft: '20px',
          }}
        >
          欢迎使用 Ant.Design
        </div>
      </div>
      <div
        style={{
          marginTop: '0px',
          flex: 1,
        }}
      >
      </div>
    </div>
  );
};

export default Home;
